﻿@{
    ViewBag.Title = "订单报表";
}
<h2 class="text-center">订单报表</h2>
<div id="hot"></div>

@section scripts{
    <script type="text/javascript">
        var dataObject =@Html.Raw(ViewBag.DataObject);
        var hotElement = document.querySelector('#hot');
        var hotElementContainer = hotElement.parentNode;
        var hotSettings = {
            data: dataObject,
            columns: [
                {
                    data: 'OrderNumber',
                    type: 'text',
                },
                {
                    data: 'CompanyName',
                    type: 'text',
                },
                {
                    data: 'ProductName',
                    type: 'text',
                },
                {
                    data: 'Count',
                    type: 'text',
                },
                {
                    data: 'ModleNum',
                    type: 'text',
                },
                {
                    data: 'Size',
                    type: 'text',
                },
                {
                    data: 'WorkerName',
                    type: 'text',
                },
                {
                    data: 'T_CreateDate',
                    type: 'text',
                },
                {
                    data: 'T_IsComplete',
                    type: 'text',
                },
                {
                    data: 'T_IsShip',
                    type: 'text',
                },
            ],
            stretchH: 'all',
            autoWrapRow: true,
            maxRows: 22,
            manualRowResize: true,
            manualColumnResize: true,
            rowHeaders: true,
            colHeaders: [
                '订单号',
                '公司名称',
                '零件名称',
                '数量',
                '型号',
                '规格',
                '处理者',
                '创建日期',
                '订单完成',
                '订单出货',
            ],
            manualRowMove: true,
            manualColumnMove: true,
            contextMenu: true,
            filters: true,
            dropdownMenu: true,
            readOnly:true,
        };
        var hot = new Handsontable(hotElement, hotSettings);
    </script>
}